package org.eiahe.hr.attendance.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.attendance.domain.OvertimeRule;

/**
 * 加班规则业务对象
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = OvertimeRule.class, reverseConvertGenerate = false)
public class OvertimeRuleBo extends BaseEntity {

    /**
     * 规则ID
     */
    @NotNull(message = "规则ID不能为空", groups = { EditGroup.class })
    private Long ruleId;

    /**
     * 关联班次ID
     */
    @NotNull(message = "班次ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long shiftId;

    /**
     * 工作日加班阈值(分钟)
     */
    private Integer workdayThresholdMinutes;

    /**
     * 周末规则(0不算加班 1打卡即算加班)
     */
    private String weekendRule;

    /**
     * 节假日规则(0不算加班 1打卡即算加班)
     */
    private String holidayRule;

    /**
     * 最小计算单位(分钟)
     */
    private Integer minUnitMinutes;

    /**
     * 状态(0正常 1停用)
     */
    private String status;

    /**
     * 备注
     */
    private String remark;
}
